package ink.yuanchu.picachoframework.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import ink.yuanchu.picachoframework.dao.PermissionsMapper;
import ink.yuanchu.picachoframework.entity.Permissions;
import ink.yuanchu.picachoframework.service.PermissionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author ziyuan
 * @Date: 2021/03/20/14:05
 * @Description:
 */
@Service
public class PermissionsServiceImpl extends ServiceImpl<PermissionsMapper, Permissions> implements PermissionsService {

    @Autowired
    private PermissionsMapper permissionsMapper;

    @Override
    public List<Permissions> findByRoleId(String roleId) {
        return permissionsMapper.findByRoleId(roleId);
    }

    @Override
    public List<Permissions> distinctPermissionId() {
        return permissionsMapper.distinctPermissionId();
    }

    @Override
    public List<Permissions> findAll() {
        return permissionsMapper.selectList(null);
    }
}
